<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class RaterMessage
 *
 * @package App\Models
 * @property int $id
 * @property int $rater_id
 * @property int $sender_id
 * @property int $status
 * @property string $content
 * @property string $created_at
 * @property string $updated_at
 * @property-read \App\Models\User $rater
 * @property-read \App\Models\User $sender
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereRaterId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereSenderId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereContent($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\RaterMessage whereStatus($value)
 * @mixin \Eloquent
 */
class RaterMessage extends Model
{
    /**
     * 评委
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function rater()
    {
        return $this->belongsTo(Rater::class, 'rater_id');
    }

    /**
     * 发送者
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function sender()
    {
        return $this->belongsTo(RaterAdmin::class, 'sender_id');
    }
}